import 'package:flutter/material.dart';
import '../../../lib_baseview/routes/routes.dart';
import '../../m_chatroom.dart';

class RoomRouteAware extends WkRouteAware {
  final RootProxyModel roomModel;

  RoomRouteAware(this.roomModel);

  /// Called when the current route has been pushed.
  @override
  void didPush(Route<dynamic> route, Route? previousRoute) {
    super.didPush(route, previousRoute);

    var name = WkRouteAware.getRouteName(route);
    // if (name == RoomPage.routeName) roomModel.hideOverlay();
  }

  /// Called when the current route has been popped off.
  @override
  void didPop(Route<dynamic> route, Route? previousRoute) {
    super.didPop(route, previousRoute);

    var name = WkRouteAware.getRouteName(route);
    // if (name == RoomPage.routeName && roomModel.channel != null) roomModel.showOverlay();
  }
}
